package ControllerApplication;

import java.util.List;

import ModelApplication.Sound;
import ProcessingAudioWindows.W1AudioProcessingWindow;
import ProcessingAudioWindows.W2AudioProcessingWindow;

public class AudioProcessingFactory {

	public static AudioProcessingLocal getAudioProcessing(int selectedMethod, String methodName, int windowX, int windowY, List<Sound> sounds) {

		AudioProcessingMethods processingMethod = AudioProcessingMethods.fromInteger( selectedMethod );

		if(processingMethod.equals( AudioProcessingMethods.W1 )) {
			return (AudioProcessingLocal) new W1AudioProcessing( methodName, new W1AudioProcessingWindow(windowX, windowY) );
		} else if(processingMethod.equals( AudioProcessingMethods.W2 )) {
            return (AudioProcessingLocal) new W2AudioProcessing( methodName, new W2AudioProcessingWindow(windowX, windowY) );
        }

		return null;

	}

}
